

#include <Python.h>
#include <numpy/arrayobject.h>
#include <cassert>
#include <iostream>
#include <cstdlib>
#include <string>
#include "video.h"
#include <sys/param.h>
using namespace std;




void testInterfaz() {
    cout << "TEST INTERFAZ" << endl;
    cout << "Inicializado Video" << endl;
	Video video((long)200, (long)200);
    assert(video.isOn());
	video.pintar(string("00ff00").c_str());
	video.pintar (string("0000ff").c_str());
	int* matriz = video.matriz();
	int pos[2];
    cout << "HAGA CLICK EN EL RECTANGULO PARA CONTINUAR" << endl;
    int col = 0x000000ff;
    for( int i = 0; i < 3; i ++) {
        video.waitForClick(pos);
        for(int x = 0; x < 40000; x++){ // 200*200 = 40000
            matriz[x] = col;
        }
        cout << "posicion donde usted hizo click:";
        cout << "(" << pos[0] << "\\" << pos[1] << ")"<< endl;
        video.refresh();
        col <<= 8;
    }
	
	
}




